package com.wjw.springsecuritydemo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;

//基于注解的访问控制，在controller注解分配权限 500错误 @EnableGlobalMethodSecurity(securedEnabled = true)
//prePostEnabled执行前判断权限 postPostEnabled执行后判断
@SpringBootApplication
@EnableGlobalMethodSecurity(securedEnabled = true,prePostEnabled = true)
public class SpringsecuritydemoApplication {

    public static void main(String[] args) {

        SpringApplication.run(SpringsecuritydemoApplication.class, args);
    }

}
